package com.xxx.car.redisCluster.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * Created by youxiaojia on 2017/6/12.
 */

@Configuration
@PropertySource(value = "classpath:redis.properties")
@EnableCaching
public class RedisProperties {
    //集群配置装配
    @Value("${spring.redis.expireSeconds}")
    private int expireSeconds;
    @Value("${spring.redis.clusterNodes}")
    private String clusterNodes;
    @Value("${spring.redis.commandTimeout}")
    private int commandTimeout;
    @Value("${spring.redis.maxRedirections}")
    private int maxRedirections;
    @Value("${spring.redis.maxActive}")
    private int maxActive;
    @Value("${spring.redis.maxIdle}")
    private int maxIdle;
    @Value("${spring.redis.maxWait}")
    private int maxWait;
    @Value("${spring.redis.minIdle}")
    private int minIdle;

    //pool配置装配
    @Value("spring.pool.redis.host")
    private String poolHost;
    @Value("spring.pool.redis.password")
    private String poolPassword;
    @Value("${spring.pool.redis.expireSeconds}")
    private int poolExpireSeconds;
    @Value("${spring.pool.redis.commandTimeout}")
    private int poolCommandTimeout;
    @Value("${spring.pool.redis.maxRedirections}")
    private int poolMaxRedirections;
    @Value("${spring.pool.redis.maxActive}")
    private int poolMaxActive;
    @Value("${spring.pool.redis.maxIdle}")
    private int poolMaxIdle;
    @Value("${spring.pool.redis.maxWait}")
    private int poolMaxWait;
    @Value("${spring.pool.redis.minIdle}")
    private int poolMinIdle;
    @Value("${spring.pool.redis.db}")
    private int poolDb;


    public int getExpireSeconds() {
        return expireSeconds;
    }

    public void setExpireSeconds(int expireSeconds) {
        this.expireSeconds = expireSeconds;
    }

    public String getClusterNodes() {
        return clusterNodes;
    }

    public void setClusterNodes(String clusterNodes) {
        this.clusterNodes = clusterNodes;
    }

    public int getCommandTimeout() {
        return commandTimeout;
    }

    public void setCommandTimeout(int commandTimeout) {
        this.commandTimeout = commandTimeout;
    }

    public int getMaxRedirections() {
        return maxRedirections;
    }

    public void setMaxRedirections(int maxRedirections) {
        this.maxRedirections = maxRedirections;
    }

    public int getMaxActive() {
        return maxActive;
    }

    public void setMaxActive(int maxActive) {
        this.maxActive = maxActive;
    }

    public int getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMaxWait() {
        return maxWait;
    }

    public void setMaxWait(int maxWait) {
        this.maxWait = maxWait;
    }

    public int getMinIdle() {
        return minIdle;
    }

    public void setMinIdle(int minIdle) {
        this.minIdle = minIdle;
    }

    public int getPoolCommandTimeout() {
        return poolCommandTimeout;
    }

    public void setPoolCommandTimeout(int poolCommandTimeout) {
        this.poolCommandTimeout = poolCommandTimeout;
    }

    public int getPoolExpireSeconds() {
        return poolExpireSeconds;
    }

    public void setPoolExpireSeconds(int poolExpireSeconds) {
        this.poolExpireSeconds = poolExpireSeconds;
    }

    public int getPoolMaxActive() {
        return poolMaxActive;
    }

    public void setPoolMaxActive(int poolMaxActive) {
        this.poolMaxActive = poolMaxActive;
    }

    public int getPoolMaxIdle() {
        return poolMaxIdle;
    }

    public void setPoolMaxIdle(int poolMaxIdle) {
        this.poolMaxIdle = poolMaxIdle;
    }

    public int getPoolMaxRedirections() {
        return poolMaxRedirections;
    }

    public void setPoolMaxRedirections(int poolMaxRedirections) {
        this.poolMaxRedirections = poolMaxRedirections;
    }

    public int getPoolMaxWait() {
        return poolMaxWait;
    }

    public void setPoolMaxWait(int poolMaxWait) {
        this.poolMaxWait = poolMaxWait;
    }

    public int getPoolMinIdle() {
        return poolMinIdle;
    }

    public void setPoolMinIdle(int poolMinIdle) {
        this.poolMinIdle = poolMinIdle;
    }

    public String getPoolHost() {
        return poolHost;
    }

    public void setPoolHost(String poolHost) {
        this.poolHost = poolHost;
    }

    public String getPoolPassword() {
        return poolPassword;
    }

    public void setPoolPassword(String poolPassword) {
        this.poolPassword = poolPassword;
    }

    public int getPoolDb() {
        return poolDb;
    }

    public void setPoolDb(int poolDb) {
        this.poolDb = poolDb;
    }
}
